<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>DCO 信息管理</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
</head>
<body>
    <h1>DCO 信息管理</h1>
    <form action="/add" method="POST">
        <input type="text" name="name" placeholder="姓名" required>
        <input type="email" name="email" placeholder="邮箱" required>
        <label for="signed">已签署</label>
        <input type="checkbox" name="signed">
        <button type="submit">添加 DCO</button>
    </form>

    <h2>已添加的 DCO</h2>
    <ul>
        {% for dco in dcos %}
            <li>
                {{ dco.name }} ({{ dco.email }}) - {% if dco.signed %}已签署{% else %}未签署{% endif %}
                <a href="/update/{{ dco.id }}">更新</a>
                <a href="/delete/{{ dco.id }}" onclick="return confirm('确定删除？')">删除</a>
            </li>
        {% endfor %}
    </ul>
</body>
</html>
